import 'package:get/get.dart';
import 'package:safemap/safemap.dart';

// 车辆信息
class VehicleDataModel {
  // sn
  String? sn;

  // name
  RxString name = ''.obs;

  // 是否连接成功
  bool? isConnected;

  VehicleDataModel.fromMap(Map<dynamic, dynamic> map) {
    SafeMap data = SafeMap(map);
    sn = data['sn'].string;
    name.value = data['name'].string ?? '';
    isConnected = data['connect_status'].boolean;
  }
}
